//
//  WYTAdvertisementCell.m
//  CirclePush
//
//  Created by admin on 2018/4/9.
//  Copyright © 2018年 admin. All rights reserved.
//

#import "WYTAdvertisementCell.h"
@interface WYTAdvertisementCell()
@property (strong, nonatomic) IBOutlet UIView *mediaView;

@property (strong, nonatomic) IBOutlet UIView *DeliveryView;


@end
@implementation WYTAdvertisementCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
    
    self.mediaView.userInteractionEnabled = YES;
    UITapGestureRecognizer *ges = [[UITapGestureRecognizer alloc]initWithTarget:self action:@selector(clickMediaView)];
    [self.mediaView addGestureRecognizer:ges];
    
    self.DeliveryView.userInteractionEnabled = YES;
    UITapGestureRecognizer *ges1 = [[UITapGestureRecognizer alloc]initWithTarget:self action:@selector(clickDeliveryView)];
    [self.DeliveryView addGestureRecognizer:ges1];
    
}

-(void)clickMediaView
{
    if ([self.delegate respondsToSelector:@selector(clickMoblieAction)]) {
        [self.delegate clickMoblieAction];
    }
}
-(void)clickDeliveryView
{
    if ([self.delegate respondsToSelector:@selector(clickDeliverAction)]) {
        [self.delegate clickDeliverAction];
    }
}




- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}
-(void)setImageModel:(WYImageModel *)imageModel
{
    _imageModel = imageModel;
    [self.adImageView sd_setImageWithURL:[NSURL URLWithString:imageModel.image]];
}
@end
